package com.example.math.calculator;

import ktjy.Calculator;

public class DivideCalculator implements Calculator {
    @Override
    public double calculate(double num1, double num2) {
        if (num2 == 0) {
            throw new IllegalArgumentException("除数不能为0");
        }
        return num1 / num2;
    }
}
